package com.pearadmin.pro.modules.training.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pearadmin.pro.common.web.base.page.PageResponse;
import com.pearadmin.pro.common.web.base.page.Pageable;
import com.pearadmin.pro.modules.training.entity.TrainingEquipment;
import com.pearadmin.pro.modules.training.entity.vo.PageTrainingEquipmentVO;
import com.pearadmin.pro.modules.training.mapper.TrainingEquipmentRepository;
import com.pearadmin.pro.modules.training.service.TrainingEquipmentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class TrainingEquipmentServiceImpl extends ServiceImpl<TrainingEquipmentRepository, TrainingEquipment> implements TrainingEquipmentService {


    @Resource
    private TrainingEquipmentRepository trainingEquipmentRepository;

    @Override
    public PageResponse<TrainingEquipment> page(PageTrainingEquipmentVO request) {
        return Pageable.of(request,(()-> trainingEquipmentRepository.page(request)));
    }

}
